// +build linux

package main

import (
	"context"
	"fmt"
	"os/exec"
)

//vlcPlay VLC播放
func vlcPlay(ctx context.Context, dIP, dPort, videoFile string) (*exec.Cmd, error) {
	command := fmt.Sprintf("%q %q --no-interact --miface=%q -R --sout=#rtp{dst=%s,port=%s,mux=ts}",
		Conf.VLCBin, videoFile, Conf.SelectNetworkInterfaceName, dIP, dPort,
	)

	return exec.CommandContext(ctx, "/bin/sh", "-c", command), nil
}
